package com.example.room.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import com.example.room.entity.MyJoinTeam;
import com.example.room.entity.Team;

import java.util.List;

@Dao
public interface MyJoinTeamDao {
    @Query("SELECT * FROM MyJoinTeam")
    LiveData<List<MyJoinTeam>> getAllTeam();

    @Insert
    void insertTeam(MyJoinTeam... teams);

    @Query("delete from MyJoinTeam")
    void deleteAllTeam();
}
